import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
	state: ()=>({
		HOME_Page:'',//首页
		MY_Page:'/P00000000000028.html',//我的页
		BASE_Path:'',//跳转路径
		BASE_Query:{},//参数传递
		BASE_NAME:'https://service2.ediblefungus.cn',//
		BASE_IMG:'https://service2.ediblefungus.cn/Image/',
		BASE_ICON:'https://service2.ediblefungus.cn/admin/icons/',
		WS_URL:'wss://service2.ediblefungus.cn/api/websocket',//websocket
		// WS_URL:'ws://nforce.iask.in/websocket',//websocket
		Open_ID:'oC5yg5fCqG02aJ6CEShpHbXUXlys',//用户编号 测试 ojEAP4-rf7FJNdyMzEN5xcpXmjSk  ogp1y608_J5m22GoFN-k5A-RSOWg oC5yg5fCqG02aJ6CEShpHbXUXlys
		App_ID:'wx120c0723ed6c91dc',// 测试 wxd96a1f0fbc125263   wx9b74a42a123612c9 wx120c0723ed6c91dc
		Point_Config:{Deduction_Ratio:'1'},
		Member:{},//用户信息
		shopNum:0,//购物车商品数量
		Enterprise_Info_SerialNumber:'',
	}),
	mutations: {
		setHOMEPage(state, payload){
			state.HOME_Page = payload
		},
		setBASEQuery(state, payload){
			state.BASE_Query = payload
		},
		setBASEPath(state, payload){
			state.BASE_Path = payload
		},
		setOpenID(state, payload){
			state.Open_ID = payload
		},
		setMember(state, payload){
			state.Member = payload
		},
		setPointConfig(state, payload){
			state.Point_Config = payload
		},
		modifyShopNum(state, payload){
			state.shopNum = payload
		}
	},
})

export default store